<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>广告位数据管理</title>
<meta name="decorator" content="default" />

<script type="text/javascript">
	$(document).ready(function() {

	});
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/ad/space/">广告位数据列表</a></li>
		<li><a href="${ctx}/ad/space/form">广告位数据添加</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="adSpace"
		action="${ctx}/ad/space/" method="post"
		class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
		<input id="pageSize" name="pageSize" type="hidden"
			value="${page.pageSize}" />
		<label>名称 ：</label>
		<form:input path="name" htmlEscape="false" maxlength="50"
			class="input-small" />
		&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit"
			value="查询" />
	</form:form>
	<tags:message content="${message}" />
	<table id="contentTable"
		class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>ID</th>
				<th>名称</th>
				<th>宽</th>
				<th>高</th>
				<th>展示类型</th>
				<th>广告类型</th>
				<shiro:hasPermission name="advertise:create">
					<th>操作</th>
				</shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.list}" var="adSpace">
				<tr>
					<td>${adSpace.id}</td>
					<td><a href="${ctx}/ad/space/form?id=${adSpace.id}">${adSpace.name}</a></td>
					<td>${adSpace.width}</td>
					<td>${adSpace.height}</td>

					<td><c:if test="${adSpace.displayType eq '1'}">
				轮流
				</c:if> <c:if test="${adSpace.displayType eq '2'}">
				对联
				</c:if> <c:if test="${adSpace.displayType eq '3'}">
				嵌入
				</c:if> <c:if test="${adSpace.displayType eq '4'}">
				弹窗
				</c:if></td>
					<td><c:if test="${adSpace.adType eq 'image'}">
				图片
				</c:if> <c:if test="${adSpace.adType eq 'flash'}">
				视频
				</c:if> <c:if test="${adSpace.adType eq 'word'}">
				文字
				</c:if></td>
					
						<td>
						<shiro:hasPermission name="advertise:update">
						<c:if test="${adSpace.isEnable eq '0'}">
								<a href="${ctx}/ad/space/enable?id=${adSpace.id}">启用</a>
							</c:if> <c:if test="${adSpace.isEnable ne '0'}">
							已启用
						</c:if> <a href="${ctx}/ad/space/form?id=${adSpace.id}">修改</a>
						</shiro:hasPermission>
						<shiro:hasPermission name="advertise:delete">
						 <a href="${ctx}/ad/space/delete?id=${adSpace.id}"
							onclick="return confirmx('确认要删除该广告位数据吗？', this.href)">删除</a>
							</shiro:hasPermission>
							</td>
					
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>
